package com.rjyb.student_management_platform.unit.config;


import com.rjyb.student_management_platform.unit.Interceptor.Interceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class WebConfig implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new Interceptor()).addPathPatterns("/**")
                .excludePathPatterns("/assets/**","/js/**","/css/**","/file1/**"
                        ,"/file2/**","/file3/**","/fonts/**","/image/**"
                        ,"/images/**","/adminInOp/login","/login/tologin"
                        ,"/login/VerifyCode","/login/login","/adminInOp/toLogin"
                        ,"/user/stuenllor","/user/enllor","/TeacherController/toteacher"
                        ,"/TeacherController/teacherEnroll","/favicon.ico");
    }

}
